import { createStore } from 'vuex'

const moduleA = {
    state: () => ({
        a: 'a'
    }),
}

const moduleB = {
    state: () => ({
        b: 'b'
    }),
}

const store = createStore({
    state() {
        return {
            appId: 1
        }
    },
    getters: {
        toDo(state: any) {
            return state.appId
        }
    },
    mutations: {
        increment(state) {
            state.appId
        }
    },
    actions: {
        increment(ctx) {
            ctx.commit('increment')
        }
    },
    modules: {
        moduleA,
        moduleB
    }
})

export default store
